package com.example.bbs.model;


import java.util.Date;

/**
 * @auther: zhangxin
 * @Description:
 */
public class Post {

    private int postId;
    private String postTitle;
    private int UserId;
    private Date postTime;
    private int replyNumber;
    private int blockId;
    private String postContent;

    private User author;

    public int getPostId() {
        return postId;
    }

    public void setPostId(int postId) {
        this.postId = postId;
    }

    public String getPostTitle() {
        return postTitle;
    }

    public void setPostTitle(String postTitle) {
        this.postTitle = postTitle;
    }

    public int getUserId() {
        return UserId;
    }

    public void setUserId(int userId) {
        UserId = userId;
    }

    public Date getPostTime() {
        return postTime;
    }

    public void setPostTime(Date postTime) {
        this.postTime = postTime;
    }

    public int getReplyNumber() {
        return replyNumber;
    }

    public void setReplyNumber(int replyNumber) {
        this.replyNumber = replyNumber;
    }

    public int getBlockId() {
        return blockId;
    }

    public void setBlockId(int blockId) {
        this.blockId = blockId;
    }

    public String getPostContent() {
        return postContent;
    }

    public void setPostContent(String postContent) {
        this.postContent = postContent;
    }

    public User getAuthor() {
        return author;
    }

    public void setAuthor(User author) {
        this.author = author;
    }

    public Post() {
    }

    public Post(String postTitle, int userId, Date postTime, int replyNumber, int blockId, String postContent) {
        this.postTitle = postTitle;
        UserId = userId;
        this.postTime = postTime;
        this.replyNumber = replyNumber;
        this.blockId = blockId;
        this.postContent = postContent;
    }

    public Post(int postId, String postTitle, int userId, Date postTime, int replyNumber, int blockId, String postContent) {
        this.postId = postId;
        this.postTitle = postTitle;
        UserId = userId;
        this.postTime = postTime;
        this.replyNumber = replyNumber;
        this.blockId = blockId;
        this.postContent = postContent;
    }

    public Post(String postTitle, int userId, int blockId, String postContent) {
        this.postTitle = postTitle;
        UserId = userId;
        this.blockId = blockId;
        this.postContent = postContent;
    }


    @Override
    public String toString() {
        return "Post{" +
                "postId=" + postId +
                ", postTitle='" + postTitle + '\'' +
                ", UserId=" + UserId +
                ", postTime=" + postTime +
                ", replyNumber=" + replyNumber +
                ", blockId=" + blockId +
                ", postContent='" + postContent + '\'' +
                '}';
    }
}
